package mofei.concurrent.task;

/**
 * @author mofei@staff.weibo.com
 * @date 2019/2/22 11:38 AM
 */
public class SleepTask implements Runnable {

    private String threadState;
    /**
     * 为了查看线程的状态转换，让线程sleep5分钟
     */
    @Override
    public void run() {
        try {
            System.out.println("Thread:"+Thread.currentThread().getName()+"调用sleep(5分钟)");
            this.threadState="TIMED_WAITING";
            Thread.sleep(1000*60*5);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
